1. Field of the Invention
The present invention relates to an image synthesizing system which can perform the synthesization of high-quality image in real time.
2. Description of the Related Art
There are known various image synthesizing systems used as in three-dimensional (3-D) games, airplane or other vehicle simulators and so on. Typically, such image synthesizing systems have information of image relating to a 3-D object 300 as shown in FIG. 36, which has previously been stored therein. Information of image is perspectively transformed into a pseudo 3-D image 308 on a screen 306. As a player 302 makes an operation with a control panel 304 such as rotation, translation or the like, the system responds to the control signal to perform the processing with respect to rotation, translation or the like of the image of the 3-D object 300 in real time. Thereafter, the processed 3-D image is perspectively transformed into the pseudo 3-D image on the screen 306. As a result, the player 302 itself can rotate or translate the three-dimensional objects in real time to experience a virtual 3-D space.
FIG. 37 shows one of such image synthesizing systems. The image synthesizing system will be described as being applied to a 3-D game.
As shown in FIG. 37, the image synthesizing system comprises an operator's control unit 510, a game space processing unit 500, an image synthesizing unit 512 and a CRT 518.
The game space processing unit 500 sets a game space in response to control signals from the operator's control unit 510 and in accordance with a game program which has been stored in a central processing unit 506. Namely, the processing is performed with respect to what position and direction the 3-D object 300 should be arranged in.
The image synthesizing unit 512 comprises an image supply unit 514 and an Image forming unit 516. The image synthesizing unit 512 performs the synthesization of a pseudo 3-D image in accordance with information of a game space set by the game space processing unit 500.
In this image synthesizing system, 3-D objects in the game space are defined as polyhedrons which are divided into 3-D polygons. As shown in FIG. 36, for example, the 3-D object 300 is represented as a polyhedron which is divided into 3-D polygons 1-6 (polygons 4-6 not shown herein). The coordinates and associated data of each vertex in each of the 3-D polygons (which will be referred to "image data of vertices") have been stored in a 3-D image data storage 552.
The image supply unit 514 performs various mathematical treatments such as rotation, translation and others, and various coordinate conversions such as perspective transformation and others, for the image data of vertices, in accordance with the setting of the game space processing unit 500. After the image data of vertices has been processed, it is permuted in a given order before outputted to the image forming unit 516.
The image forming unit 516 comprises a polygon generator 570 and a palette circuit 580. The polygon generator 570 comprises an outline (polygon edges) point processing unit 824 and a line processor 326. The image forming unit 516 is adapted to perform a process of painting all the dots (pixels) in the polygon with a predetermined color data or the like in the following procedure:
First of all, the outline point processing unit 324 calculates left-hand and right-hand outline points which are intersection points between polygon edges AB, BC, CD, DA and other polygon edges and scan lines, as shown in FIG. 38. Subsequently, the line processor 326 paints, with specified color data, sections between the left-hand and right-hand outline points, for example, sections between L and Q; Q and R as shown in FIG. 38. In FIG. 38, the section between L and Q is painted by red color data while the section between Q and R is painted by blue color data. Thereafter, the color data used on painting are transformed into RGB data in the palette circuit 580, and then the RGB data in turn is outputted to and displayed in CRT 518.
In such an image synthesizing system of the prior art, all the dots on a single polygon can be painted only by the same color, as described. As can be seen in FIG. 38, for example, the dots on the polygon 1 are only painted by red color; the dots on the polygon 2 are only painted by yellow color; and the dots on the polygon 3 are only painted by blue color. Thus, the formed image is monotonous without reality.
If an object having its complicated surface is to be displayed to avoid such a monotonousness, the number of divided polygons must greatly be increased. For example, if a 3-D object 332 having a texture of color data as shown in FIG. 39 is to be formed by the image synthesizing system of the prior art, it is required to divide a polyhedron into polygons 1-80 (polygons 41-80 not shown herein) for processing. Namely, various processing operations including the rotation, translation and perspective transformation, the treatment of polygon outline, the painting and the like must be performed for all the polygons. It is thus required to treat polygons ten-odd times those of the 3-D object 300 having no texture as shown in FIG. 36. However, the system for synthesizing an image in real time must terminate the drawing of an image to be displayed by treating all the dots for every field (1/60 seconds). In order to draw such a 3-D object 332 having a texture of color data, one requires a hardware having a very increased speed or an increased scale to perform a parallel operation. As the number of polygons to be processed is increased, the memory and data processor of the system is necessarily increased in scale. In image synthesizing systems such as video game machines which are limited in cost and space, it is therefore subsequently impossible to draw a pseudo 3-D image having a delicate texture with high quality.
In the field of computer graphics and the like, there is known a texture mapping technique shown in FIG. 40. The texture mapping separates the image data of a 3-D object 332 into the image data of a polyhedron 334 and the texture data of textures 336 and 338, which are in turn stored in the system. On displaying an image, the texture data of the textures 336. 338 are applied to the polyhedron 334 to perform the image synthesization.
The texture mapping technique is realized in the field of very large-scale and expensive image processing systems such as exclusive image-processing computers known as graphics work stations, flight simulators and so on. Very few image synthesizing systems which are relatively inexpensive like video game machines only utilize the texture mapping technique since it is difficult to increase the speed and scale of their hardwares. In addition, such video game machines can only display limited number and size of 3-D objects and the mapping they provide is inaccurate since the operation is performed by a simple approximation. As a result, the reality of image is very degraded. Furthermore, the real-time display is insufficient since the frequency of updating the scene is low, that is, for several frames per second.
The texture mapping technique must apply two-dimensional textures to the 3-D object as shown in FIG. 40. The far and near sense and linearity in the mapped textures will be damaged.
Japanese Patent Laid-Open No. Sho 63-80375 discloses a technique for improving the problem of linearity. Such a technique is directed to maintain a linearity by performing the mapping along each side of a polygon, rather than a scan line. However, the linearity may not be maintained by the orientation of the line. Further, time is wastefully required to treat the same dot repeatedly. In addition, the far and near sense will not improved at all.
In order to avoid the monotonousness in the synthesized image, a technique is considered which varies the brightness data in the surface of an object, rather than the color information. One such technique is Gouraud shading method which may be used when the brightness data in the surface of an object varies simply and continuously. There is also known Phong shading method which Is used when the normal vector varies, for example, from Japanese Patent Publication Nos. Hei 3-45427 or 3-45428.
Gouraud and Phong shading techniques determine the brightness data and normal vector in each dot merely from a linear interpolation. Thus, an image having no far and near sense in the variations of brightness will be synthesized. As the 3-D synthesized image is subjected to rotation or other treatment, the reality in the image may be damaged.